package cn.samler.diandi.api.model.io.request.post;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class Evaluate {
    @NotBlank(message = "request id must be not null")
    private String id;

    @NotNull(message = "post id must be not null")
    private Integer pid;

    @NotNull(message = "rate must be not null")
    @Min(value = 1, message = "最低评分不能低于1")
    @Max(value = 5, message = "最高评分不能高于5")
    private Integer rate;

    private String comment = "用户没有留下评论";
}
